<!doctype html>
<html lang="en">
<head>
    <base href="/">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Epilog Theme">
    <title>Bizlamp - Multipurpose eCommerce HTML Template</title>

    <!-- Favicons -->
    <link rel="icon" type="image/png" href="assets/images/favicon.png">

    <!-- CSS Files -->
    <link rel="stylesheet" href="assets/css/aos.css">
    <link rel="stylesheet" href="assets/css/animate.min.css">
    <link rel="stylesheet" href="assets/css/boxicons.min.css">
    <link rel="stylesheet" href="assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/mailform.css">
    <link rel="stylesheet" href="assets/css/style.css?v=1.0.1">
    <link rel="stylesheet" href="assets/css/responsive.css?v=1.0.1">
</head>
<body>
    <!-- Header Area Start -->
    <header class="header-area">
        <div class="main-navbar">
            <div class="container">
                <nav class="navbar navbar-expand-lg navbar-light">
                    <a class="navbar-brand" href="shopping/index">
                        <img src="assets/images/logo.png" alt="logo">
                    </a>
                    <ul class="cart-menu responsive">
                        <li>
                            <a id="dropdownCartButton" class="position-relative" data-toggle="dropdown" href="#"><span class="item-count">10</span> <i class="bx bx-cart-alt"></i> </a>
                            <div class="dropdown">
                                <div class="dropdown-menu cart-dropdown" aria-labelledby="dropdownCartButton">
                                    <p>2 item(s) in your cart - <span>$665.00</span></p>
                                    <div class="minicart-products">
                                        <div class="minicart-product-info d-flex">
                                            <figure>
                                                <a href="#"> <img class="img-border" src="assets/images/products/product_01.png" alt="Home Decoration"></a>
                                            </figure>
                                            <div class="product-meta">
                                                <h5 class="product-title">
                                                    <a href="#">Artisan Craft Design Product Handicraft</a>
                                                </h5>
                                                <span class="product-price">1 x $280.00</span>
                                            </div>
                                            <a class="delete-btn" href="#" title="Delete Product">
                                                <span class="item-delete"><i class="bx bx-trash"></i></span>
                                            </a>
                                        </div>
                                        <div class="minicart-product-info d-flex">
                                            <figure>
                                                <a href="#"> <img class="img-border" src="assets/images/products/product_02.png" alt="Home Decoration"></a>
                                            </figure>
                                            <div class="product-meta">
                                                <h5 class="product-title">
                                                    <a href="#">Duis sodales ligula et orci pretium tempus</a>
                                                </h5>
                                                <span class="product-price">1 x $280.00</span>
                                            </div>
                                            <a class="delete-btn" href="#" title="Delete Product">
                                                <span class="item-delete"><i class="bx bx-trash"></i></span>
                                            </a>
                                        </div>

                                        <div class="minicart-product-calculation">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <p><strong>Shipping:</strong> <span>$7.00</span></p>
                                                    <p><strong>Tax:</strong> <span>Free</span></p>
                                                    <p><strong>Total: </strong> <span>$665.00</span></p>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="dcart-action">
                                                        <a href="shopping/cart" class="btn btn-primary">View Cart</a>
                                                        <a href="checkout.html" class="btn btn-secondary">Checkout</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </li>
                        <li>
                            <a id="dropdownUserButton" data-toggle="dropdown" href="#"><i class="bx bx-user-circle"></i> </a>
                            <div class="dropdown">
                                <div class="dropdown-menu user-dropdown" aria-labelledby="dropdownUserButton">

                                    <a class="dropdown-item" href="#"><i class="bx bx-user-circle"></i> My Account</a>
                                    <a class="dropdown-item" href="#"><i class="bx bx-heart"></i> My Wishlist</a>
                                    <a class="dropdown-item" href="#"><i class="bx bx-cart-alt"></i> Checkout</a>
                                    <a class="dropdown-item" href="#"><i class="bx bx-log-in"></i> Login Or Register</a>
                                </div>
                            </div>
                        </li>
                        <li>
                            <form class="searchbox">
                                <input type="search" placeholder="Search......" name="search" class="searchbox-input" required="">
                                <button class="searchbox-submit" type="submit"><i class="bx bx-search-alt"></i></button>
                            </form>
                            <a class="search-btn"><i class="bx bx-search-alt"></i></a>
                        </li>
                        <li>
                            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
                                <i class='bx bx-menu'></i>
                                <i class='bx bx-x'></i>
                            </button>
                        </li>
                    </ul>

                    <div class="collapse navbar-collapse mean-menu" id="navbarCollapse">
                        <ul class="navbar-nav mr-auto">
                            <li class="nav-item dropdown">
                                <a class="nav-link active" href="shopping/index">
                                    Home
                                </a>
                            </li>
                            <li class="nav-item dropdown">
                                <a class="nav-link" href="#" data-toggle="dropdown" aria-expanded="false">
                                    Shop <i class="bx bx-chevron-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="nav-item"><a href="shop.html" class="nav-link">Shop Grid</a></li>
                                    <li class="nav-item"><a href="product-details.html" class="nav-link">Products Details</a></li>
                                    <li class="nav-item"><a href="shopping/cart" class="nav-link">Cart</a></li>
                                    <li class="nav-item"><a href="checkout.html" class="nav-link">Checkout</a></li>
                                </ul>
                            </li>

                            <li class="nav-item dropdown megamenu">
                                <a class="nav-link" href="#" data-toggle="dropdown" aria-expanded="false">
                                    Collection <i class="bx bx-chevron-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="nav-item">
                                        <div class="container">
                                            <div class="row">
                                                <div class="col-md-3 col-sm-6 col-xs-6 ">
                                                    <h6 class="submenu-title">Men</h6>
                                                    <ul class="megamenu-submenu">
                                                        <li><a href="#">Consectetur adipiscing elit</a></li>
                                                        <li><a href="#">Pellentesque facilisis</a></li>
                                                        <li><a href="#">Vivamus at sapien</a></li>
                                                        <li><a href="#">Elementum urna</a></li>
                                                        <li><a href="#">Sed et mauris</a></li>
                                                        <li><a href="#">Sed sit amet purus</a></li>
                                                        <li><a href="#">Tristique ac faucibus</a></li>
                                                    </ul>
                                                </div>

                                                <div class="col-md-3 col-sm-6 col-xs-6 ">
                                                    <h6 class="submenu-title">Women</h6>
                                                    <ul class="megamenu-submenu">
                                                        <li><a href="#">Consectetur adipiscing elit</a></li>
                                                        <li><a href="#">Pellentesque facilisis</a></li>
                                                        <li><a href="#">Vivamus at sapien</a></li>
                                                        <li><a href="#">Elementum urna</a></li>
                                                        <li><a href="#">Sed et mauris</a></li>
                                                        <li><a href="#">Sed sit amet purus</a></li>
                                                        <li><a href="#">Tristique ac faucibus</a></li>
                                                    </ul>
                                                </div>

                                                <div class="col-md-3 col-sm-6 col-xs-6 ">
                                                    <h6 class="submenu-title">Baby</h6>
                                                    <ul class="megamenu-submenu">
                                                        <li><a href="#">Consectetur adipiscing elit</a></li>
                                                        <li><a href="#">Pellentesque facilisis</a></li>
                                                        <li><a href="#">Vivamus at sapien</a></li>
                                                        <li><a href="#">Elementum urna</a></li>
                                                        <li><a href="#">Sed et mauris</a></li>
                                                        <li><a href="#">Sed sit amet purus</a></li>
                                                        <li><a href="#">Tristique ac faucibus</a></li>
                                                    </ul>
                                                </div>

                                                <div class="col-md-3 col-sm-6 col-xs-6 ">
                                                    <h6 class="submenu-title">Accessories</h6>

                                                    <ul class="megamenu-submenu">
                                                        <li><a href="#">Consectetur adipiscing elit</a></li>
                                                        <li><a href="#">Pellentesque facilisis</a></li>
                                                        <li><a href="#">Vivamus at sapien</a></li>
                                                        <li><a href="#">Elementum urna</a></li>
                                                        <li><a href="#">Sed et mauris</a></li>
                                                        <li><a href="#">Sed sit amet purus</a></li>
                                                        <li><a href="#">Tristique ac faucibus</a></li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </li>

                            <li class="nav-item dropdown">
                                <a class="nav-link" href="#" data-toggle="dropdown" aria-expanded="false">
                                    Pages <i class="bx bx-chevron-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="nav-item"><a href="about.html" class="nav-link">About Us</a></li>
                                    <li class="nav-item"><a href="shopping/signin" class="nav-link">Login</a></li>
                                    <li class="nav-item"><a href="signup.html" class="nav-link">Register</a></li>
                                    <li class="nav-item"><a href="error-404.html" class="nav-link">404 Error</a></li>

                                    <li class="nav-item"><a href="faqs.html" class="nav-link">FAQ's</a></li>
                                    <li class="nav-item"><a href="contact.html" class="nav-link">Contact Us</a></li>
                                </ul>

                            </li>

                            <li class="nav-item dropdown">
                                <a class="nav-link" href="#" data-toggle="dropdown" aria-expanded="false">
                                    Blog <i class="bx bx-chevron-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="nav-item"><a href="blog.html" class="nav-link">Blog</a></li>
                                    <li class="nav-item"><a href="blog-grid.html" class="nav-link">Blog Grid</a></li>
                                    <li class="nav-item"><a href="blog-details.html" class="nav-link">Blog Details</a></li>
                                </ul>
                            </li>
                            <li class="nav-item">
                                <a href="contact.html" class="nav-link">Contact</a>
                            </li>
                        </ul>
                        <ul class="cart-menu">
                            <li>
                                <a class="position-relative" data-toggle="dropdown" href="#"><span class="item-count">10</span><i class='bx bx-cart-alt' ></i></a>
                                <div class="dropdown">
                                    <div class="dropdown-menu cart-dropdown" aria-labelledby="dropdownCartButton">
                                        <p>2 item(s) in your cart - <span>$665.00</span></p>
                                        <div class="minicart-products">
                                            <div class="minicart-product-info d-flex">
                                                <figure>
                                                    <a href="#"> <img class="img-border" src="assets/images/products/product_01.png" alt="Home Decoration"></a>
                                                </figure>
                                                <div class="product-meta">
                                                    <h5 class="product-title">
                                                        <a href="#">Artisan Craft Design Product Handicraft</a>
                                                    </h5>
                                                    <span class="product-price">1 x $280.00</span>
                                                </div>
                                                <a class="delete-btn" href="#" title="Delete Product">
                                                    <span class="item-delete"><i class="bx bx-trash"></i></span>
                                                </a>
                                            </div>
                                            <div class="minicart-product-info d-flex">
                                                <figure>
                                                    <a href="#"> <img class="img-border" src="assets/images/products/product_02.png" alt="Home Decoration"></a>
                                                </figure>
                                                <div class="product-meta">
                                                    <h5 class="product-title">
                                                        <a href="#">Duis sodales ligula et orci pretium tempus</a>
                                                    </h5>
                                                    <span class="product-price">1 x $280.00</span>
                                                </div>
                                                <a class="delete-btn" href="#" title="Delete Product">
                                                    <span class="item-delete"><i class="bx bx-trash"></i></span>
                                                </a>
                                            </div>


                                            <div class="minicart-product-calculation">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <p><strong>Shipping:</strong> <span>$7.00</span></p>
                                                        <p><strong>Tax:</strong> <span>Free</span></p>
                                                        <p><strong>Total: </strong> <span>$665.00</span></p>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="dcart-action">
                                                            <a href="shopping/cart" class="btn btn-primary">View Cart</a>
                                                            <a href="checkout.html" class="btn btn-secondary">Checkout</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <a data-toggle="dropdown" href="#"><i class='bx bx-user-circle' ></i></a>
                                <div class="dropdown">
                                    <div class="dropdown-menu user-dropdown" aria-labelledby="dropdownUserButton">

                                        <a class="dropdown-item" href="#"><i class='bx bx-user-circle' ></i> My Account</a>
                                        <a class="dropdown-item" href="#"><i class='bx bx-heart' ></i> My Wishlist</a>
                                        <a class="dropdown-item" href="#"><i class='bx bx-cart-alt' ></i> Checkout</a>
                                        <a class="dropdown-item" href="#"><i class='bx bx-log-in' ></i> Login Or Register</a>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <form class="searchbox">
                                    <input type="search" placeholder="Search......" name="search" class="searchbox-input" required>
                                    <button class="searchbox-submit" type="submit"><i class="bx bx-search-alt"></i></button>
                                </form>
                                <a class="search-btn"><i class='bx bx-search-alt' ></i></a>
                            </li>
                        </ul>
                    </div>
                </nav>

            </div>
        </div>
    </header>
    <!-- Header Area End -->



    <!-- Breadcrumbs Area Start -->
    <div class="breadcrumbs text-center">
        <div class="container">
            <h2 class="page-title">Shopping Cart</h2>
            <ul class="breadcrumbs-link">
                <li><a href="shopping/index">Home <i class="bx bx-chevrons-right"></i></a></li>
                <li>Cart</li>
            </ul>
        </div>
    </div>
    <!-- Breadcrumbs Area Start -->

    <!-- Cart Area Start -->
    <div class="bl-cart-wrapper">
        <div class="container">
            <table class="table-responsive cart-info">
                <thead>
                    <tr>
                        <th><span>Product Name</span></th>
                        <th>Price</th>
                        <th>Quantity</th>
                        <th>Subtotal</th>
                    </tr>
                </thead>
                <tbody id="cart-items">
                <!-- 购物车商品将动态插入到这里 -->


                    <tr>
                        <td>
                            <div class="product-info d-flex">
                                <div class="product-image">
                                    <img class="img-fluid" src="assets/images/products/product_01.png" alt="">
                                </div>
                                <div class="product-name">
                                    <h5><a href="#">Pink Dress</a></h5>
                                    <p>SDF: 6786875</p>
                                    <p>Color: Pink</p>
                                    <p>Size: L</p>
                                </div>
                            </div>
                        </td>
                        <td class="price"><strong>$140.00</strong></td>
                        <td>
                            <div class="quantity">
                                <form id="quantity-form" method="POST" action="#">
                                    <input type="button" value="-" class="qtyminus minus" >
                                    <input type="text" name="quantity" value="1" class="qty">
                                    <input type="button" value="+" class="qtyplus plus">
                                </form>
                            </div>
                        </td>
                        <td class="price"><strong>$160.00</strong><button class="delete-item"><i class="bx bxs-trash"></i></button></td>
                    </tr>
                    <tr>
                        <td>
                            <div class="product-info d-flex">
                                <div class="product-image">
                                    <img class="img-fluid" src="assets/images/products/product_02.png" alt="">
                                </div>
                                <div class="product-name">
                                    <h5><a href="#">Smart Watch</a></h5>
                                    <p>SDF: 6786875</p>
                                    <p>Color: Black</p>
                                    <p>Size: M</p>
                                </div>
                            </div>
                        </td>
                        <td class="price"><strong>$140.00</strong></td>
                        <td>
                            <div class="quantity">
                                <form id="quantity-form2" method="POST" action="#">
                                    <input type="button" value="-" class="qtyminus minus">
                                    <input type="text" name="quantity" value="1" class="qty">
                                    <input type="button" value="+" class="qtyplus plus">
                                </form>
                            </div>
                        </td>
                        <td class="price"><strong>$140.00</strong><button class="delete-item"><i class="bx bxs-trash"></i></button></td>
                    </tr>
                    <tr>
                        <td>
                            <div class="product-info d-flex">
                                <div class="product-image">
                                    <img class="img-fluid" src="assets/images/products/product_03.png" alt="">
                                </div>
                                <div class="product-name">
                                    <h5><a href="#">Formal Watch</a></h5>
                                    <p>SDF: 6786875</p>
                                    <p>Color: Black</p>
                                    <p>Size: S</p>
                                </div>
                            </div>
                        </td>
                        <td class="price"><strong>$30.00</strong></td>
                        <td>
                            <div class="quantity">
                                <form id="quantity-form3" method="POST" action="#">
                                    <input type="button" value="-" class="qtyminus minus">
                                    <input type="text" name="quantity" value="1" class="qty">
                                    <input type="button" value="+" class="qtyplus plus">
                                </form>
                            </div>
                        </td>
                        <td class="price"><strong>$30.00</strong><button class="delete-item"><i class="bx bxs-trash"></i></button></td>
                    </tr>
                </tbody>
            </table>
            <div class="row">
                <div class="col-md-6">
                    <div class="discount-box">
                        <h5>Discount Code</h5>
                        <div class="discount-form">
                            <p>Enter Your Coupon Code If You Have.</p>
                            <form action="#" method="post">
                                <input type="text" placeholder="Enter Your Code" class="discount-code">
                                <input type="submit" value="Apply">
                            </form>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="total-calculation">
                        <h5>Total Amount</h5>
                        <div class="calculate">
                            <table>
                                <tr>
                                    <td><p>Total Price Of All Products</p></td>
                                    <td><strong id="total-price">$0.00</strong></td>
                                </tr>
                                <tr>
                                    <td><p>Estimated Shipping</p></td>
                                    <td><strong id="shipping-cost">$30.00</strong></td>
                                </tr>
                                <tr>
                                    <td><p> <strong>Total Amount</strong></p></td>
                                    <td><strong id="total-amount">$30.00</strong></td>
                                </tr>
                            </table>
                        </div>
                        <div class="text-center">
                            <a class="place-order" href="checkout.html"><i class="bx bx-cart-alt"></i> Proceed to checkout</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Cart Area End -->

    <!--  Footer Section Start -->
    <div class="footer">
        <div class="footer-wrapper">
            <div class="container">
                <div class="row">
                    <div class="col-sm-6 col-md-6 col-xl-3">
                        <div class="footer-widget footer-social-lcon">
                            <img src="assets/images/logo-white.png" alt="Footer Logo">
                            <br>
                            <p>Donec scelerisque augue libero. Nunc pulvinar porttitor malesuada. Nam non turpis sit amet nisl dignissim rhoncus condimentum et lectus.</p>
                            <ul class="social-icon">
                                <li><a href="#"><i class='bx bxl-facebook-square'></i></a></li>
                                <li><a href="#"><i class='bx bxl-twitter' ></i></a></li>
                                <li><a href="#"><i class='bx bxl-linkedin-square' ></i></a></li>
                                <li><a href="#"><i class='bx bxl-pinterest' ></i></a></li>
                                <li><a href="#"><i class='bx bxl-youtube' ></i></a></li>
                            </ul>

                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6 col-xl-3">
                        <div class="footer-widget">
                            <h4 class="footer-title">Contact Us</h4>
                            <div class="contact-info">
                                <p><strong>Hotline: </strong>16768</p>
                                <p><strong>Phone: </strong>(+123) 456-657878</p>
                                <p><strong>Email: </strong><a href="mailto:someone@example.com">someone@example.com</a></p>
                                <p><strong>Address: </strong>6757 Blvd, The Bronx, NY 1058, USA</p>
                            </div>

                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6 col-xl-3">
                        <div class="footer-widget">
                            <h4 class="footer-title">Information</h4>
                            <ul class="footer-menu">
                                <li><a href="#"><i class='bx bx-radio-circle' ></i> About Us</a></li>
                                <li><a href="#"><i class='bx bx-radio-circle' ></i> Privacy Policy</a></li>
                                <li><a href="#"><i class='bx bx-radio-circle' ></i> Terms & Conditions</a></li>
                                <li><a href="#"><i class='bx bx-radio-circle' ></i> Delivery Information</a></li>
                                <li><a href="#"><i class='bx bx-radio-circle' ></i> Order and Returns</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-6 col-xl-3">
                        <div class="footer-widget">
                            <h4 class="footer-title">Subscribe</h4>
                            <p>Subscrive to our newsletter, so that you can be the first product offer.</p>
                            <form action="shopping/index" method="post">
                                <input type="text" class="form-control" placeholder="Enter Your Email Address" name="subscribe">
                                <button type="submit" class="btn btn-primary">Subscribe Now</button>
                            </form>

                            <img class="img-fluid mt-2" src="assets/images/we-accept-payment.png" alt="We Accept">
                        </div>
                    </div>
                </div>

            </div>
            <div class="footer-copyright">
                <p class="copyright-text">Copyright &copy; 2025 <a target="_blank" href="https://www.mobanwang.com/" title="网站模板">网站模板</a></p>
            </div>
        </div>

    </div>
    <!--  Footer Section Start -->

    <!--  Top to Bottom  -->
    <div class="top-bottom-scroll"><i class='bx bx-chevrons-up bx-fade-up' ></i></div>

    <!-- JS Script -->
    <script src="./assets/js/jquery.min.js"></script>
    <script src="./assets/js/bootstrap.min.js"></script>
    <script src="./assets/js/popper.min.js"></script>
    <script src="./assets/js/aos.js"></script>
    <script src="./assets/js/mailform.js"></script>
    <script src="./assets/js/owl.carousel.min.js"></script>
    <script src="./assets/js/main.js?v=1.0.0"></script>
    <script></script>

    <script>
        $(document)(function(){
            $.ajax({
                url:'/cart/getCarts/',
                success:function (response){
                    if(response.code===0){
                        const cartItems=response.data;
                        const cartTableBody=$('#cart-items');

                        cartItems.forEach(function(item){
                            const row=`
                               <tr>
                                <td>
                                    <input type="checkbox" class="product-checkbox" checked> <!-- 默认选中 -->
                                </td>
                                <td>
                                    <div class="product-info d-flex">
                                        <div class="product-image">
                                            <img class="img-fluid" src="${item.product.imgurl}" alt="${item.product.name}">
                                        </div>
                                        <div class="product-name">
                                            <h5><a href="#">${item.product.name}</a></h5>
                                        </div>
                                    </div>
                                </td>
                                <td class="price"><strong>￥${item.product.price}</strong></td>
                                <td>
                                    <div class="quantity">
                                        <form class="quantity-form" data-cart-id="${item.productid}" action="#">
                                            <input type="button" value="-" class="qtyminus minus">
                                            <input type="text" name="quantity" value="${item.num}" class="qty">
                                            <input type="button" value="+" class="qtyplus plus">
                                        </form>
                                    </div>
                                </td>
                                <td class="price"><strong>￥${(item.product.price * item.num)}</strong>
                                    <button class="delete-item" data-cart-id="${item.productid}"><i class="bx bxs-trash"></i></button>
                                </td>
                            </tr>
                            `;
                            cartTableBody.append(row);
                        })

                    }else{
                        alert("error");
                    }
                },error:function(error){
                    alert("error")
                }
            })
            $(document).on('click','delete-item',function(){
                const cartId=$(this).data("cart-id");
                if(confirm("确定要删除吗")){
                    $.ajax({
                        url:'/cart/delete',
                        data:{productid:cartId},
                        success:function(response){
                            if(response===0){
                                location.reload();
                            }else{
                                alert("删除失败");
                            }

                        },error:function(error){
                            alert("error")
                        }
                    })
                }
            })

            $(document).on('click','qtyplus',function(){
                const input=$(this).siblings('.qty');
                let quanitity=parseInt(input);
                input.val(quanitity+1);
                updateCartItemQuantity(input);

            })
            $(document).on('click','gtymimus',function(){
                const input=$(this).siblings('.qty');
                let quanitity=parseInt(input);
                input.val(quanitity-1);
                updateCartItemQuantity(input);
            })

            function updateCartItemQuantity(input){
                const form=input.closest('.quantity-form');
                const cartId=form.data('cart-id');
                const quantity=input.val();

                $.ajax({
                    url:'/cart/edit',
                    data:{productid:cartId,num:quantity},
                    success:function(response){
                        if(response.code===0){

                        }
                    }
                })
            }

        })
    </script>



</body>
</html>